home *** CD-ROM | disk | FTP | other *** search
ASP.NET Web Form | 2002-03-17 | 1.5 KB | 36 lines |
- <%@ Page Language="vb" AutoEventWireup="false" Codebehind="SingleValueDataBindingForm.aspx.vb" Inherits="DataBinding.SingleValueDataBindingForm" %>
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
- <HTML>
- <HEAD>
- <title>SingleValueDataBindingForm</title>
- <meta name="GENERATOR" content="Microsoft Visual Studio.NET 7.0">
- <meta name="CODE_LANGUAGE" content="Visual Basic 7.0">
- <meta name="vs_defaultClientScript" content="JavaScript">
- <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
- </HEAD>
- <body>
- <FORM id="Form1" method="post" runat="server">
- <H1>Simple Data Binding Demo</H1>
- <P>This page demonstrates how you can do simple data binding on a form. Select a
- record from the DropDownList control and view the fields of the corresponding
- record.</P>
- <P> </P>
- <P><STRONG>Select a Title:
- <asp:dropdownlist id="ddlTitles" runat="server" Width="356px" AutoPostBack="True"></asp:dropdownlist></P>
- <HR width="100%" noShade SIZE="2">
- <P>Title:
- <asp:textbox id="txtTitle" runat="server" Width="243px" Text='<%# Titles("title") %>'>
- </asp:textbox></P>
- <P>Price:
- <asp:textbox id="txtPrice" runat="server" Width="93px" Text='<%# DataBinder.Eval(Titles, "(""price"")", "{0:C4}") %>'>
- </asp:textbox></P>
- <P>Type:
- <asp:textbox id="txtType" runat="server" Text='<%# Titles("type") %>' >
- </asp:textbox></P>
- <P></STRONG> </P>
- <P>
- </FORM>
- </P>
- </body>
- </HTML>
-